package router

import (
	"github.com/gin-gonic/gin"
	"myplatform/router/comment"
	"myplatform/router/post"
	"myplatform/router/post_type"
	"myplatform/router/user"
)

func Load(g *gin.Engine) {
	g.GET("/", defaultPage)
	//首页
	g.GET("/index", Index)
	//管理员主页
	g.GET("/manager", Manager)
	//加载用户路由
	user.LoadUser(g)
	//加载post路由
	post.PostLoad(g)
	//加载类型路由
	post_type.TypeLoad(g)
	//加载pl路由
	comment.CommentLoad(g)

}
func Index(c *gin.Context) {
	c.HTML(200, "index.html", gin.H{})
}

func Manager(c *gin.Context) {
	c.HTML(200, "manager.html", gin.H{})
}

func defaultPage(c *gin.Context) {
	c.HTML(200, "default.html", gin.H{})
}
